package com.ybxx.base.service.impl;

import java.util.List;

import org.apache.commons.lang.StringUtils;

import com.ybxx.base.dao.FeesDao;
import com.ybxx.base.model.Fees;
import com.ybxx.base.model.Residents;
import com.ybxx.base.service.FeesService;
import com.ybxx.core.command.QueryFilter;
import com.ybxx.core.dao.GenericDao;
import com.ybxx.core.service.impl.BaseServiceImpl;
import com.ybxx.core.web.paging.PagingBean;

public class FeesServiceImpl extends BaseServiceImpl<Fees> implements
		FeesService {
	private FeesDao feesDao;
	public FeesServiceImpl(FeesDao dao) {
		super(dao);
		this.feesDao=dao;
		// TODO Auto-generated constructor stub
	}
	public Fees queryFees(String cid) {
		String hql="from Fees f where f.community.cid='"+cid+"'";
		return (Fees)feesDao.findUnique(hql, null);
	}
	@Override
	public Fees save(Fees entity) {
		this.feesDao.excuteSql("delete from tbl_base_fees_item where fid='"+entity.getFid()+"'");
		return super.save(entity);
	}
	

}
